<?php
namespace app\admin\api;


use think\Controller;
use \think\Session;
use app\admin\common\Http\ConferenceHttpClient;


//获取apptoken接口类
class AppToken extends ConferenceHttpClient
{

    /**
     * 获取apptoken
     * @return [type] [description]
     */
    public function index($data)
    {
            if($data) {
                //获取数据
                $url = '/token/app';

                //请求接口信息
                $result = $this->get($url,$data);

                //用户信息存入session
                if ($result->code == 0){
                    //Session::set('user',$result['obj']->data) ;
                    return $result->data->token;

                }else{
                    return $result->message;
                }
            }
    }
}